package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 工单记录表
 * </p>
 *
 * @author guoliang.lao
 * @since 2022-09-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_gas_workorder_history")
@ApiModel(value="WorkorderHistory对象", description="工单记录表")
public class WorkOrderHistory extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "本系统流水号 唯一")
    @TableField("wo_seq")
    private String woSeq;

    @ApiModelProperty(value = "报警器设备表主键")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "报警器设备表主键")
    @TableField("new_device_id")
    private String newDeviceId;

    @ApiModelProperty(value = "工单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "户号")
    @TableField("subs_code")
    private String subsCode;


    @ApiModelProperty(value = "销售单ID,当为三商工单时为三商工单编号")
    @TableField("pkid")
    private String pkid;

    @ApiModelProperty(value = "作业系统：0:时刻助手 1:TCIS 2:新工单系统 3:师傅帮个忙 4:三商")
    @TableField("work_system")
    private Integer workSystem;

    @ApiModelProperty(value = "tcis 工单类型,  0:其他, 1:安装单 ,2：报警处理, 3：故障处理 4：一键呼救报警处理 5：水浸报警处理" +
            " 6：烟雾报警处理  7：门锁报警处理 8：点火工单 9:安检单")
    @TableField("order_type")
    private Integer orderType;

    @ApiModelProperty(value = "发起渠道 0:报警器 1:时刻家 2:新时刻助手")
    @TableField("from_system")
    private Integer fromSystem;

    @ApiModelProperty(value = "原因 例:故障原因")
    @TableField("reason")
    private String reason;

    @ApiModelProperty(value = "发起时气体浓度值")
    @TableField("concentration")
    private Integer concentration;

    @ApiModelProperty(value = "发起时设备状态")
    @TableField("device_status")
    private Integer deviceStatus;

    @ApiModelProperty(value = "工单处理状态 0:进行中 1:完成")
    @TableField("handle_status")
    private Integer handleStatus;


    @ApiModelProperty(value = "工单完成时间")
    @TableField("complete_time")
    private Date completeTime;


    @TableField(exist = false)
    private String createDate;
    @TableField(exist = false)
    private String updateDate;

    @ApiModelProperty(value = "发起操作人")
    @TableField("operator_by")
    private String operatorBy;

    @ApiModelProperty(value = "工单渠道")
    @TableField("order_channel")
    private Integer orderChannel;

    @ApiModelProperty(value = "客户id")
    @TableField("ConsumerId")
    private Integer consumerId;

    @ApiModelProperty(value = "客户类型 1-企业客户 2-个人客户")
    @TableField("cust_type")
    private Integer custType;
}
